export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

/**
 * 权限数据的ts类型
 */
export interface Permission {
  id?: number
  createTime?: string
  updateTime?: string
  pid: number
  name: string
  code: string
  toCode?: string
  type?: number
  status?: null
  level: number
  children?: PermissionList
  select?: boolean
}

/**
 * 权限列表的ts类型
 */
export type PermissionList = Permission[]

/**
 * 权限信息获取接口返回数据的ts类型
 */
export interface PermissionResponseData extends ResponseData {
  data: PermissionList
}

/**
 * 添加与修改菜单携带的参数的ts类型
 */
export interface MenuParams {
  id?: number
  code: string
  level: number
  name: string
  pid: number
}
